<?php
/**
 * Created by PhpStorm.
 * User: ASUS
 * Date: 2016/10/16
 * Time: 17:44
 */
if(!defined('APP')) die('error!');?>;
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>员工信息列表</title>
    </head>
<body>
<div>员工信息列表</div>
<!--输出分页链接 -->
<div><?php echo $page_html;?></div>
<form action="./showList.php" method="GET">
    <div>快速查询：<input type="text" name="keyword"/><input type="submit" value="提交" /></div>
</form>
<div><a href="./empAdd.php">添加员工</a> </div>
<table>
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th><a href="./showList.php?order=e_dept&sort=<?php echo ($order=='e_dept')?$sort:'desc';?>"> 所属部门</th>
        <th>出生日期</th>
        <th>入职时间</th><th>相关操作</th>
    </tr>
        <?php if (!empty($emp_info)){ ?>
        <?php foreach ($emp_info as $row){ ?>
               <tr>
                   <td><?php echo $row['e_id']; ?></td>
                   <td><?php echo $row['e_name']; ?></td>
                   <td><?php echo $row['e_dept']; ?></td>
                   <td><?php echo $row['data_of_birth']; ?></td>
                   <td><?php echo $row['data_of_entry']; ?></td>
                   <td><div><span>编辑&nbsp;&nbsp;删除</span></div></td>
               </tr>
0            <?php } ?>
         <?php }else{  ?>
            <tr><td colspan="6">查询的结果不存在！</td></tr>
        <?php } ?>
    <a href="<?php echo './empUpdate.php?e_id='.$row['e_id'] ?>">编辑
    </a>&nbsp;&nbsp;
    <a href="#">删除</a>
    </table>
</body>
</html>

